package cn.controller;

import cn.service.impl.AttributeListServiceImpl;
import entity.DTO;
import entity.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@CrossOrigin
public class AttributeListController {
    @Resource
    AttributeListServiceImpl attributeListService;

    @RequestMapping("/queryAttributeList")
    public Result queryAttributeList(Long parent_id,Integer currentPage,Integer pageSize) {//返回attribute_id,attribute_name集合
        return attributeListService.queryAttributeList(parent_id,currentPage,pageSize);
    }

    @RequestMapping("/addAttributeList")
    public Result addAttributeList(@RequestBody DTO dto) {
       return attributeListService.addAttributeList(dto);
    }
}
